﻿<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:ajax="http://www.apusic.com/jsf/ajax" xmlns:biz="http://www.kingdee.com/jsf/biz" xmlns="http://www.w3.org/1999/xhtml" xmlns:om="http://www.apusic.com/jsf/misc" xmlns:kd="http://www.kingdee.com/jsf/component" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:layout="http://www.apusic.com/jsf/layout" xmlns:h="http://java.sun.com/jsf/html" xmlns:w="http://www.apusic.com/jsf/widget" renderKitId="AJAX">
	<kd />
	<ui:composition template="/custom/aoyuan/aytime/bizbill/edit-template.xhtml">	
		<ui:define name="resBefore">
			<f:loadBundle basename="com.kingdee.eas.custom.aoyuan.aytime.bizbill.web.HolidayBillEditUIBean" var="extraMsgs" />			
		</ui:define>		
		<ui:define name="resAfter">
			<script type="text/javascript" src="../../../../resource/common.js"></script>		
			<script type="text/javascript" src="js/holidayBillEdit.js"></script>
		</ui:define>
		<ui:define name="toolbar">
			<div class="titlePanel">
			<div style="margin-top: 10px">		
				<h:panelGrid columns="13">	
					<w:button id="btnMySave" immediate="true" value="#{extraMsgs['btnSave.label']}" onclick="btnMySave();" />
					<w:button id="btnSave" jsvar="btnSave" style="display:none;" label="#{extraMsgs['btnSave.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.saveAction}" />
					<w:button id="btnMySumit" immediate="true" value="#{extraMsgs['btnSubmit.label']}" onclick="btnMySumit();" />
					<w:button id="btnSubmit" jsvar="btnSubmit" style="display:none;"  label="#{extraMsgs['btnSubmit.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.submitAction}" />
					<w:button id="btnExit" label="#{extraMsgs['btnExit.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.exitAction}" />	
					<w:button id="btnAuditDetail"  label="审批明细" jsvar="btnAuditDetail" onclick="showProcessDiagramWin();" />
					<w:button id="btn-attach" label="附件管理" actionBinding="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.attachmentMgrAction}" rendered="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.bthAttach_Rendered}" immediate="true"/>					
				</h:panelGrid>	
			</div>
			<div class="solidLine" />
			</div>
		</ui:define>	
		<ui:define name="message">
			<kd:msgArea style=""></kd:msgArea>
		</ui:define>	
		<ui:define name="header">
			<layout:panelGrid columns="3" width="100%">	
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contNumber" width="260" height="19" caption="#{extraMsgs['contNumber.caption']}" lineWidth="100" childItem="txtNumber" jsvar="contNumber">
						<w:textField id="txtNumber" jsvar="txtNumber" disabled="true" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.number}" />
					</kd:labelContainer>					
				</layout:cell>	
				<!--<layout:cell colspan="1" rowspan="1">		
					<kd:labelContainer id="contstatus" width="270" height="19" caption="#{extraMsgs['contstatus.caption']}" lineWidth="100" childItem="status" jsvar="contstatus">
						<kd:enumCombo id="status" type="com.kingdee.eas.custom.aoyuan.aytime.AYAttenBillStatusEnum" jsvar="status" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.status}" />
					</kd:labelContainer>
				</layout:cell>-->
				<layout:cell colspan="1" rowspan="1">		
					<kd:labelContainer id="contBizDate" width="260" height="19" caption="#{extraMsgs['contBizDate.caption']}" lineWidth="100" childItem="txtBizDate" jsvar="contBizDate">
						<w:dateField id="txtBizDate" jsvar="txtBizDate" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.bizDate}">
							<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
						</w:dateField>
					</kd:labelContainer>
				</layout:cell>		
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contapplier" width="270" height="19" caption="#{extraMsgs['contapplier.caption']}" lineWidth="100" childItem="prmtapplier" jsvar="contapplier">
						<kd:promptBox id="prmtapplier" queryInfo="com.kingdee.eas.custom.aoyuan.aytime.basedata.app.PersonHRQuery" diaplayFormat="$name$" editFormat="$number$" commitFormat="$number$" jsvar="prmtapplier" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.applier}" >
						<ajax:action event="datachanged" immediate="true"
							action="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.changeEmp}" />
						</kd:promptBox>		
					</kd:labelContainer>	
				</layout:cell>				
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contDept" width="270" height="19" caption="#{extraMsgs['contDept.caption']}" lineWidth="100" childItem="prmtDept" jsvar="contDept">
						<kd:promptBox id="prmtDept" queryInfo="com.kingdee.eas.basedata.org.app.AdminItemQuery" displayFormat="$name$" editFormat="$number$" jsvar="prmtDept" orgType="1" />
					</kd:labelContainer>
				</layout:cell>		
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contposition" width="270" height="19" caption="#{extraMsgs['contposition.caption']}" lineWidth="100" childItem="prmtposition" jsvar="contposition">
						<kd:promptBox id="prmtposition" queryInfo="com.kingdee.eas.basedata.org.app.PositionQuery" diaplayFormat="$name$" editFormat="$number$" commitFormat="$number$" jsvar="prmtposition" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.position}" />
					</kd:labelContainer>
				</layout:cell>			
				<layout:cell colspan="1" rowspan="1">	
					<kd:labelContainer id="contRemark" width="270" height="19" caption="#{extraMsgs['contRemark.caption']}" lineWidth="100" childItem="txtRemark" jsvar="contRemark">
						<w:textField id="txtRemark" jsvar="txtRemark" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.remark}" />
					</kd:labelContainer>				
				</layout:cell>	
				<layout:cell colspan="1" rowspan="1">	
					<kd:labelContainer id="contStartdate" width="270" height="19" caption="#{extraMsgs['contStartdate.caption']}" lineWidth="100" childItem="txtStartdate" jsvar="contStartdate" style="display:none;" >
						<w:dateField id="txtStartdate"  jsvar="txtStartdate" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.startdate}">
							<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
						</w:dateField>
					</kd:labelContainer>				
				</layout:cell>		
				<layout:cell colspan="1" rowspan="1">	
					<kd:labelContainer id="contendDate" width="270" height="19" caption="#{extraMsgs['contendDate.caption']}" lineWidth="100" childItem="txtendDate" jsvar="contendDate" style="display:none;" >
						<w:dateField id="txtendDate" jsvar="txtendDate" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.endDate}">
							<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
						</w:dateField>
					</kd:labelContainer>				
				</layout:cell>					
				<layout:cell colspan="1" rowspan="1">			
					<kd:labelContainer id="contOtNegative"  visible="true" width="270" caption="透支标识" lineWidth="80" style="display:none;">
						<w:textField id="txtOtNegative" disabled="true" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.isOtNegative}" jsvar="txtOtNegative" />
					</kd:labelContainer>
				</layout:cell>	
				<layout:cell colspan="1" rowspan="1">			
					<kd:labelContainer id="fid"  visible="true" width="270" caption="id" lineWidth="80" style="display:none;">
						<w:textField id="txtfid" disabled="true" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.id}" jsvar="txtfid" />
					</kd:labelContainer>
				</layout:cell>					
			</layout:panelGrid>	
			<ajax:updater id="contenter" binding="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.otBalanceUpdater}" >
				<div style='margin-top:20px;display:none;' >
					<div style='margin-left:20px;'>
						<span><font style='font-weight:bold ;margin-right:15px;'>目前累计加班剩余 : 工作日加班:</font></span>
						<span id="spNormalOT">#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.otBalanceInfo.normalOT}</span>
						<span ><font style='font-weight:bold;margin-left:10px;margin-right:10px;'>周末日加班:</font></span>
						<span id="spWeekenOT">#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.otBalanceInfo.weekenOT}</span>
						<span ><font style='font-weight:bold;margin-left:10px;margin-right:10px;'>节假日日加班:</font></span>
						<span id="spHolidayOT">#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.otBalanceInfo.holidayOT}</span>
					</div>  					
				</div>					
		</ajax:updater>	
				<div style='margin-top:20px;'>
					<div style='margin-left:20px;'>
						<span ><font style='font-weight:bold ;margin-right:15px;'>总时间合计(小时):</font></span>
						<span id="spAllOTsum"></span>
						<span><font style="font-weight:bold;margin-left:10px;margin-right:10px;display:none;">工作日加班调休:</font></span>
						<span id="spNormalOTsum" style="display:none;" ></span>
						<span ><font style="font-weight:bold;margin-left:10px;margin-right:10px;display:none;">周末日加班调休:</font></span>
						<span id="spWeekenOTsum" style="display:none;" ></span>
						<span ><font style="font-weight:bold;margin-left:10px;margin-right:10px;display:none;">节假日日加班调休:</font></span>
						<span id="spHolidayOTsum" style="display:none;" ></span>
					</div>  					
				</div>			
		</ui:define>
		<ui:define name="entry">
			<layout:panelGrid  columns="4" width="100%">	
				<layout:cell  colspan="1" rowspan="1">	
					<div style="clear: left; float: right">
						<h:commandLink id="appendRow" immediate="true" 
							action="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.holidayBillEntryBean_apendRow}">
								<img src="#{skin.getSkinReourceURL('/widget/images/table1_button_add.gif')}" />
						</h:commandLink>
						<span/>
						<h:commandLink id="removeRow" immediate="true"
						    disabled="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.isDisabledByState('entryRowButton')}"
							action="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.holidayBillEntryBean_removeRow}">
								<img src="#{skin.getSkinReourceURL('/widget/images/table1_button_delete.gif')}" />
						</h:commandLink>
						<h:commandLink id="roadListModel" immediate="true"  style="display:none;"
							action="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.holidayBillEntryBean_roadListModel}">
								<img src="#{skin.getSkinReourceURL('/widget/images/table1_button_delete.gif')}" />
						</h:commandLink>						
						<span/>						
						<h:commandLink id="btnLongHoliday" immediate="true" jsvar="btnLongHoliday" onclick="forwardLongHoliday()"
						    disabled="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.isDisabledByState('entryRowButton')}">
							<h:outputText value="长假录入"  /> 
						</h:commandLink>						
					</div>	
			    	<div id ="entryDiv" style="clear: both;" >
						<w:editDataGrid id="editGrid" clicksToEdit="1"  style="overflow-x:auto;overflow-y:hidden;" height="300" binding="#{custom.aoyuan.aytime.bizbill.HolidayBillEntryBean.editGrid}" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEntryBean.listModel}" var="data" showRowNumber="true" sync="true" align="left" jsvar="editGrid">
							<w:idColumn id="id" header="id" width="100" idColumn="true" hidden="true" value="#{data.id}" align="left" />
							<w:outputColumn id="bizDate" header="#{extraMsgs['BizDateColumn.header']}" width="100" value="#{data.bizDate}" align="left">
								<w:dateField id="BizDateEditor">
									<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
								</w:dateField>
							</w:outputColumn>
							<w:outputColumn id="holidayType" header="#{extraMsgs['holidayTypeColumn.header']}" width="100" converter="objectValueConverter" value="#{data.holidayType}" align="left">
								<kd:promptBox id="holidayTypeEditor" queryInfo="com.kingdee.eas.custom.aoyuan.aytime.basedata.app.HolidayTypeF7Query" store="#{custom.aoyuan.aytime.bizbill.HolidayBillEntryBean.storeValue('holidayType')}" diaplayFormat="$name$" editFormat="$number$" commitFormat="$number$" />
							</w:outputColumn>
							<w:outputColumn id="startTime" header="#{extraMsgs['StartTimeColumn.header']}"  width="100" value="#{data.startTime}" align="left">
								<w:timeField id="StartTimeEditor" format="G:i:s" increment="30" >
									<kd:convertAllDate pattern="HH:mm:ss" castType="java.sql.Time" />
								</w:timeField>
							</w:outputColumn>
							<w:outputColumn id="endTime" header="#{extraMsgs['EndTimeColumn.header']}" width="100" value="#{data.endTime}" align="left">
								<w:timeField id="EndTimeEditor" format="G:i:s" increment="30" >
									<kd:convertAllDate pattern="HH:mm:ss" castType="java.sql.Time" />
								</w:timeField>
							</w:outputColumn>
							<w:outputColumn id="signedCard" header="忘打卡时间" width="100" value="#{data.signedCard}" align="left">
								<w:timeField id="SignedCardEditor" format="G:i:s" increment="30" >
									<kd:convertAllDate pattern="HH:mm:ss" castType="java.sql.Time" />
								</w:timeField>
							</w:outputColumn>	
							<w:outputColumn id="totalhour" header="#{extraMsgs['totalhourColumn.header']}" clientFormatter="sumHourRenderer"  width="100" value="#{data.totalhour}" align="left">
								<w:numberField id="totalhourEditor" />
							</w:outputColumn>	
							<w:outputColumn id="address" header="公出地点" width="80" value="#{data.address}" align="left">
								<w:textField id="addressEditor" required="false"   />
							</w:outputColumn>	
							<w:outputColumn id="workDetail" header="工作事项" width="100" value="#{data.workDetail}" align="left">
								<w:textField id="workDetailEditor" required="false"   />
							</w:outputColumn>									
							<w:outputColumn id="remark" header="#{extraMsgs['RemarkColumn.header']}" width="100" value="#{data.remark}" align="left">
								<w:textField id="RemarkEditor" required="false"   />
							</w:outputColumn>
							<w:outputColumn id="restStart"  width="100" header='休息开始时间' hidden="true"  align="left">
								<w:numberField id="restStartEditor" />
							</w:outputColumn>	
							<w:outputColumn id="restEnd"  width="100" header='休息结束时间' hidden="true" align="left">
								<w:numberField id="restEndEditor" />
							</w:outputColumn>	
							<w:outputColumn id="workHours"  width="100" header='工作时间' hidden="true"  align="left">
								<w:numberField id="workHoursEditor" />
							</w:outputColumn>	
							<w:outputColumn id="holidayTypeName"  width="100" header='假期'  hidden="true" value="#{data.holidayType.htype}" align="left">
							</w:outputColumn>		
							<w:outputColumn id="holidayTypeStr"  width="100" header='假期名称' hidden="true" value="#{data.holidayType.name}" align="left">
							</w:outputColumn>							
						</w:editDataGrid>				
					</div>					
				</layout:cell>					
			</layout:panelGrid>		
		</ui:define>
	    <ui:define name="bottom">	
			<layout:panelGrid  columns="3" width="100%">
				<layout:cell  colspan="1" rowspan="1">	
					<kd:labelContainer id="contCreator" width="260" disabled="false" caption="创建人" lineWidth="100" childItem="prmtCreator" jsvar="contCreator">
						<kd:promptBox id="prmtCreator" disabled="true" converter="objectValueConverter" jsvar="prmtCreator" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.creator}" />
					</kd:labelContainer>						
				</layout:cell>	
				<layout:cell  colspan="1" rowspan="1">	
					<kd:labelContainer id="contCreateTime" width="260" disabled="false" caption="创建时间" lineWidth="100">
						<w:dateField id="kDDateCreateTime" disabled="true" jsvar="kDDateCreateTime" value="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean.model.createTime}" />
					</kd:labelContainer>			
				</layout:cell>	
				<layout:cell  colspan="1" rowspan="1">					
				</layout:cell>						
			</layout:panelGrid>
	    </ui:define>	
		<ui:define name="innerAjaxActions">
			<biz:billEditInnerAjaxAction beanName="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean}"></biz:billEditInnerAjaxAction>
		</ui:define>	
		<ui:define name="inner-window">	
			<biz:innerWindow beanName="#{custom.aoyuan.aytime.bizbill.HolidayBillEditUIBean}"></biz:innerWindow>
			<w:form id="ajaxsubmitForm">
				<w:button id="ajaxsubmitButton" value="click me" style="display:none" />
			</w:form>
		</ui:define>	
	</ui:composition>			
</f:view>		
